package com.bsoft.exchange.controller.appointmentandregistration;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bsoft.exchange.domain.HospitalInformation;
import com.bsoft.exchange.pojo.GetHospitalInformationPoJo;
import com.bsoft.exchange.response.ResponseEntity;
import com.bsoft.exchange.service.HospitalInformationService;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value = "appointment")
public class HospitalInformationController {

	@Autowired
	private HospitalInformationService hospitalInformationService;

	@ApiOperation(value = "获取医院信息")
	@RequestMapping(value = "/getHospitalInformation",method = RequestMethod.POST,produces = "application/json")
//	public List<HospitalInformation> selectList(@RequestParam(value = "hospitalCode",required = false ) String hospitalCode,
//			@RequestParam(value = "lastModifyTime",required = false ) Date lastModifyTime) {
//		return hospitalInformationService.selectList(hospitalCode,lastModifyTime);
	public ResponseEntity<List<HospitalInformation>> selectList(@RequestBody GetHospitalInformationPoJo getHospitalInformationPoJo) {
		List<HospitalInformation> hospitalInformation = hospitalInformationService.selectList(getHospitalInformationPoJo.getOrganizationId(),getHospitalInformationPoJo.getLastModifyTime());
		ResponseEntity<List<HospitalInformation>> entity=new ResponseEntity<>();
		
		entity.setData(hospitalInformation);
		
		return entity;
		
		
			
	
	}
}
